package com.ssy.lingxi.product.api.feign;

import com.ssy.lingxi.common.model.vo.SelectVO;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.product.api.hystrix.GoodsPriceHystrix;
import com.ssy.lingxi.product.api.hystrix.SelectProductHystrix;
import com.ssy.lingxi.product.api.model.request.price.ContractPriceRequest;
import com.ssy.lingxi.product.api.model.request.price.OrderPriceRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.List;

/**
 * @menu: 物料信息管理内部接口
 * @author lxc
 * @version 2.0.0
 * @date 2022/4/2
 */
@FeignClient(value = "product-service", fallback = GoodsPriceHystrix.class)
public interface IGoodsPriceFeign {

    /**
     * 合同物料信息同步更新
     * @param request 物料价格信息
     */
    @RequestMapping(value = "/product/feign/goods/price/contract/change", method = RequestMethod.POST)
    Wrapper<Void> changeContractGoodsPrice(@RequestBody @Valid ContractPriceRequest request);

    /**
     * 订单物料信息同步更新
     * @param request 物料价格信息
     */
    @RequestMapping(value = "/product/feign/goods/price/order/change", method = RequestMethod.POST)
    Wrapper<Void> changeOrderGoodsPrice(@RequestBody @Valid OrderPriceRequest request);
}
